<?php
class Requirement extends AppModel {

	var $name = 'Requirement';
	var $primaryKey = 'r_index';
	var $displayField = 'r_reference';
//	var $validate = array(
//		'r_index' => array('numeric'),
//		'r_title' => array('alphanumeric'),
//		'r_category' => array('numeric'),
//		'r_applicability' => array('numeric'),
//		'r_conformance' => array('numeric'),
//		'r_project' => array('numeric')
//	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $belongsTo = array(
			'Project' => array('className' => 'Project',
								'foreignKey' => 'r_project',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'Category' => array('className' => 'Category',
								'foreignKey' => 'r_category',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'Applicability' => array('className' => 'Applicability',
								'foreignKey' => 'r_applicability',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'Conformance' => array('className' => 'Conformance',
								'foreignKey' => 'r_conformance',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			)
	);
	
	var $hasMany = array(
			'ProcedureRequirement' => array('className' => 'ProcedureRequirement',
								'foreignKey' => 'pra_requirement',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'StepRequirement' => array('className' => 'StepRequirement',
								'foreignKey' => 'sra_req',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			)
	);
}
?>